1 Rmd Settings

2 Contents

covid_on_unemp_benefit_numberのOLSとWLS

3 Read functions/関数の読み込み

source("functions.R")

4 Read data/分析用データの読み込み

df_analysis <- readr::read_csv("output/df_analysis.csv")
## Parsed with column specification:
## cols(
##   .default = col_double(),
##   prefec_kanji = col_character(),
##   prefecture = col_character(),
##   date = col_date(format = ""),
##   prefec = col_character(),
##   prefec_kanji2 = col_character()
## )
## See spec(...) for full column specifications.

5 Main figures in the paper

  • We firstly provide estimations and figures used in the main text.
  • These chunks are copied and pasted from subsequent outcome-based result sections.
  • Actual graphs and tables in the paper are generated and saved in the subsequent chunks, not the chunks in this section. But they are identical.

6 Y=total unemployment benefit recipients/男女合計の雇用保険受給者数

7 Y=total unemployment benefit recipients/男女合計の雇用保険受給者数 with covar

8 Y=total unemployment benefit recipients(YOY)/男女合計の雇用保険受給者数(前年同月差)

8.5 WLS, with trends, post-covid-month dummies, TableC.3 (2)

# DID estimation
estimation_results <- dynamic_onlypost_DID_WLS_trend(dataset = df_analysis, 
                    outcome_var = df_analysis$yoy_unemp_benefit_number_total, 
                    treat_var = df_analysis$unemploy_shock_diff2)

texreg::screenreg(l = estimation_results , include.ci = FALSE, digits=3)
## 1 coefficient  not defined because the design matrix is rank deficient
## 
## ===========================================
##                                Model 1     
## -------------------------------------------
## treat_var:date_2020_02            1.544    
##                                  (4.971)   
## treat_var:date_2020_03            5.630    
##                                  (6.948)   
## treat_var:date_2020_04            9.873    
##                                  (8.287)   
## treat_var:date_2020_05            7.364    
##                                  (9.874)   
## treat_var:date_2020_06           14.187    
##                                 (14.172)   
## treat_var:date_2020_07           16.959    
##                                 (14.094)   
## treat_var:date_2020_08           11.409    
##                                 (15.255)   
## treat_var:date_2020_09           15.665    
##                                 (14.958)   
## as.factor(id)1:year_month_id     -0.744    
##                                  (0.567)   
## as.factor(id)2:year_month_id      0.105    
##                                  (0.333)   
## as.factor(id)3:year_month_id     -0.528    
##                                  (0.376)   
## as.factor(id)4:year_month_id      1.571 ***
##                                  (0.443)   
## as.factor(id)5:year_month_id      0.215    
##                                  (0.427)   
## as.factor(id)6:year_month_id      0.588    
##                                  (0.405)   
## as.factor(id)7:year_month_id      2.289 ***
##                                  (0.384)   
## as.factor(id)8:year_month_id      1.457 ***
##                                  (0.237)   
## as.factor(id)9:year_month_id      2.481 ***
##                                  (0.249)   
## as.factor(id)10:year_month_id     3.837 ***
##                                  (0.181)   
## as.factor(id)11:year_month_id     1.099 *  
##                                  (0.518)   
## as.factor(id)12:year_month_id     0.511    
##                                  (0.497)   
## as.factor(id)13:year_month_id     0.928    
##                                  (0.545)   
## as.factor(id)14:year_month_id     0.090    
##                                  (0.686)   
## as.factor(id)15:year_month_id     0.206    
##                                  (0.311)   
## as.factor(id)16:year_month_id     0.787 *  
##                                  (0.342)   
## as.factor(id)17:year_month_id     0.872 ** 
##                                  (0.278)   
## as.factor(id)18:year_month_id    -0.367    
##                                  (0.196)   
## as.factor(id)19:year_month_id     1.991 ***
##                                  (0.298)   
## as.factor(id)20:year_month_id     2.425 ***
##                                  (0.190)   
## as.factor(id)21:year_month_id     0.141    
##                                  (0.217)   
## as.factor(id)22:year_month_id     1.453 ***
##                                  (0.259)   
## as.factor(id)23:year_month_id     0.924 ** 
##                                  (0.291)   
## as.factor(id)24:year_month_id     0.294    
##                                  (0.297)   
## as.factor(id)25:year_month_id     1.408 ***
##                                  (0.273)   
## as.factor(id)26:year_month_id    -0.591    
##                                  (0.458)   
## as.factor(id)27:year_month_id     0.593    
##                                  (0.664)   
## as.factor(id)28:year_month_id    -1.118 *  
##                                  (0.519)   
## as.factor(id)29:year_month_id     0.012    
##                                  (0.598)   
## as.factor(id)30:year_month_id    -0.374    
##                                  (0.588)   
## as.factor(id)31:year_month_id    -2.007 ***
##                                  (0.390)   
## as.factor(id)32:year_month_id              
##                                            
## as.factor(id)33:year_month_id    -4.203 ***
##                                  (0.279)   
## as.factor(id)34:year_month_id    -3.690 ***
##                                  (0.301)   
## as.factor(id)35:year_month_id    -0.821 *  
##                                  (0.334)   
## as.factor(id)36:year_month_id    -0.826 *  
##                                  (0.373)   
## as.factor(id)37:year_month_id    -1.429 ***
##                                  (0.351)   
## as.factor(id)38:year_month_id    -2.502 ***
##                                  (0.326)   
## as.factor(id)39:year_month_id    -1.796 ***
##                                  (0.272)   
## as.factor(id)40:year_month_id    -0.368    
##                                  (0.386)   
## as.factor(id)41:year_month_id    -1.830 ***
##                                  (0.077)   
## as.factor(id)42:year_month_id    -0.025    
##                                  (0.273)   
## as.factor(id)43:year_month_id     3.278 ***
##                                  (0.275)   
## as.factor(id)44:year_month_id     0.376    
##                                  (0.398)   
## as.factor(id)45:year_month_id    -0.307    
##                                  (0.279)   
## as.factor(id)46:year_month_id    -1.306 ** 
##                                  (0.446)   
## as.factor(id)47:year_month_id     0.969    
##                                  (0.717)   
## -------------------------------------------
## R^2                               0.875    
## Adj. R^2                          0.863    
## Num. obs.                      1551        
## RMSE                            757.762    
## N Clusters                       47        
## ===========================================
## *** p < 0.001; ** p < 0.01; * p < 0.05
# DID estimates and 90% CI
df_estimates <- DID_coefficients_main(DID_results = estimation_results, 
                                         treat_var = "unemploy_shock_diff2",
                                 estimation_label = "yoy_total_WLS_trend")

# Event study graph
graph_yoy_total_WLS_trend_onlypost <- event_study_graph(data = df_estimates ,
                                          graph_title = "yoy_total_WLS_trend")

ggplotly(graph_yoy_total_WLS_trend_onlypost)
estimates_yoy_total_WLS_trend_onlypost <- df_estimates #for robustness check

results_yot_total_WLS_trend_onlypost <- estimation_results # for only-post DID table

9 Y=total unemployment benefit recipients(YOY)/男女合計の雇用保険受給者数(前年同月差)with covar

9.5 WLS, with trends, post-covid-month dummies, TableC.4 (2)

# DID estimation
estimation_results <- dynamic_onlypost_DID_WLS_trend_covar8Xcovid_months(dataset = df_analysis, 
                    outcome_var = df_analysis$yoy_unemp_benefit_number_total, 
                    treat_var = df_analysis$unemploy_shock_diff2)

texreg::screenreg(l = estimation_results , include.ci = FALSE, digits=3)
## 1 coefficient  not defined because the design matrix is rank deficient
## 
## ====================================================================
##                                                         Model 1     
## --------------------------------------------------------------------
## treat_var:date_2020_02                                    18.199    
##                                                          (10.175)   
## treat_var:date_2020_03                                    27.073    
##                                                          (13.816)   
## treat_var:date_2020_04                                    25.914    
##                                                          (15.932)   
## treat_var:date_2020_05                                    38.746 ** 
##                                                          (14.405)   
## treat_var:date_2020_06                                    30.055    
##                                                          (17.246)   
## treat_var:date_2020_07                                    33.794 *  
##                                                          (16.342)   
## treat_var:date_2020_08                                    25.412    
##                                                          (15.849)   
## treat_var:date_2020_09                                    28.183    
##                                                          (14.715)   
## date_2020_02:google_mobility_index_2020may                -0.609    
##                                                           (0.977)   
## date_2020_03:google_mobility_index_2020may                -0.316    
##                                                           (1.211)   
## date_2020_04:google_mobility_index_2020may                -1.870    
##                                                           (1.646)   
## date_2020_05:google_mobility_index_2020may                -2.270    
##                                                           (1.392)   
## date_2020_06:google_mobility_index_2020may                -4.524 *  
##                                                           (1.830)   
## date_2020_07:google_mobility_index_2020may                -6.403 ** 
##                                                           (2.038)   
## date_2020_08:google_mobility_index_2020may                -5.420 ** 
##                                                           (1.797)   
## date_2020_09:google_mobility_index_2020may                -3.440    
##                                                           (1.931)   
## date_2020_02:infection_rate_cumulative2020jun              1.380    
##                                                           (1.029)   
## date_2020_03:infection_rate_cumulative2020jun              2.094    
##                                                           (1.360)   
## date_2020_04:infection_rate_cumulative2020jun              1.117    
##                                                           (1.485)   
## date_2020_05:infection_rate_cumulative2020jun              0.763    
##                                                           (1.448)   
## date_2020_06:infection_rate_cumulative2020jun              2.726    
##                                                           (2.175)   
## date_2020_07:infection_rate_cumulative2020jun              1.291    
##                                                           (2.003)   
## date_2020_08:infection_rate_cumulative2020jun              2.520    
##                                                           (1.949)   
## date_2020_09:infection_rate_cumulative2020jun              3.072    
##                                                           (1.802)   
## date_2020_02:death_rate_cumulative2020jun                -12.739    
##                                                          (12.714)   
## date_2020_03:death_rate_cumulative2020jun                -22.465    
##                                                          (16.588)   
## date_2020_04:death_rate_cumulative2020jun                -13.570    
##                                                          (17.860)   
## date_2020_05:death_rate_cumulative2020jun                 -7.127    
##                                                          (16.382)   
## date_2020_06:death_rate_cumulative2020jun                -29.262    
##                                                          (27.188)   
## date_2020_07:death_rate_cumulative2020jun                -14.876    
##                                                          (23.957)   
## date_2020_08:death_rate_cumulative2020jun                -24.722    
##                                                          (21.120)   
## date_2020_09:death_rate_cumulative2020jun                -30.096    
##                                                          (18.414)   
## date_2020_02:Population_per_1_km_2_of_inhabitable_area    -0.005 *  
##                                                           (0.002)   
## date_2020_03:Population_per_1_km_2_of_inhabitable_area    -0.007 *  
##                                                           (0.003)   
## date_2020_04:Population_per_1_km_2_of_inhabitable_area    -0.008 *  
##                                                           (0.003)   
## date_2020_05:Population_per_1_km_2_of_inhabitable_area    -0.010 ***
##                                                           (0.003)   
## date_2020_06:Population_per_1_km_2_of_inhabitable_area    -0.012 ** 
##                                                           (0.004)   
## date_2020_07:Population_per_1_km_2_of_inhabitable_area    -0.012 ***
##                                                           (0.003)   
## date_2020_08:Population_per_1_km_2_of_inhabitable_area    -0.012 ***
##                                                           (0.003)   
## date_2020_09:Population_per_1_km_2_of_inhabitable_area    -0.010 ** 
##                                                           (0.004)   
## date_2020_02:Secondary_industry_ratio                    106.733    
##                                                         (105.030)   
## date_2020_03:Secondary_industry_ratio                     53.343    
##                                                         (131.692)   
## date_2020_04:Secondary_industry_ratio                     32.738    
##                                                         (169.308)   
## date_2020_05:Secondary_industry_ratio                    -16.349    
##                                                         (150.477)   
## date_2020_06:Secondary_industry_ratio                   -156.436    
##                                                         (174.178)   
## date_2020_07:Secondary_industry_ratio                     -7.816    
##                                                         (181.687)   
## date_2020_08:Secondary_industry_ratio                    124.095    
##                                                         (183.236)   
## date_2020_09:Secondary_industry_ratio                    194.477    
##                                                         (193.664)   
## date_2020_02:Tertiary_industry_ratio                    -164.171    
##                                                         (136.185)   
## date_2020_03:Tertiary_industry_ratio                    -245.608    
##                                                         (190.153)   
## date_2020_04:Tertiary_industry_ratio                    -271.900    
##                                                         (247.952)   
## date_2020_05:Tertiary_industry_ratio                    -522.593 ** 
##                                                         (188.320)   
## date_2020_06:Tertiary_industry_ratio                    -659.544 *  
##                                                         (264.041)   
## date_2020_07:Tertiary_industry_ratio                    -648.265 *  
##                                                         (253.916)   
## date_2020_08:Tertiary_industry_ratio                    -440.901    
##                                                         (230.398)   
## date_2020_09:Tertiary_industry_ratio                    -313.503    
##                                                         (212.078)   
## date_2020_02:Total_population                              0.019    
##                                                           (0.011)   
## date_2020_03:Total_population                              0.027    
##                                                           (0.015)   
## date_2020_04:Total_population                              0.037    
##                                                           (0.020)   
## date_2020_05:Total_population                              0.047 ** 
##                                                           (0.017)   
## date_2020_06:Total_population                              0.030    
##                                                           (0.025)   
## date_2020_07:Total_population                              0.032    
##                                                           (0.024)   
## date_2020_08:Total_population                              0.017    
##                                                           (0.028)   
## date_2020_09:Total_population                              0.008    
##                                                           (0.031)   
## date_2020_02:Ratio_of_aged_population                      0.132    
##                                                           (0.518)   
## date_2020_03:Ratio_of_aged_population                     -0.165    
##                                                           (0.600)   
## date_2020_04:Ratio_of_aged_population                      0.164    
##                                                           (0.885)   
## date_2020_05:Ratio_of_aged_population                      0.344    
##                                                           (0.776)   
## date_2020_06:Ratio_of_aged_population                     -0.183    
##                                                           (1.034)   
## date_2020_07:Ratio_of_aged_population                     -0.603    
##                                                           (1.136)   
## date_2020_08:Ratio_of_aged_population                     -1.277    
##                                                           (1.221)   
## date_2020_09:Ratio_of_aged_population                     -1.630    
##                                                           (1.273)   
## as.factor(id)1:year_month_id                              -0.042    
##                                                           (0.416)   
## as.factor(id)2:year_month_id                               2.132 ***
##                                                           (0.199)   
## as.factor(id)3:year_month_id                               1.018 ***
##                                                           (0.193)   
## as.factor(id)4:year_month_id                               2.727 ***
##                                                           (0.327)   
## as.factor(id)5:year_month_id                               2.242 ***
##                                                           (0.379)   
## as.factor(id)6:year_month_id                               0.990    
##                                                           (0.571)   
## as.factor(id)7:year_month_id                               2.439 ***
##                                                           (0.465)   
## as.factor(id)8:year_month_id                               1.747 ***
##                                                           (0.271)   
## as.factor(id)9:year_month_id                               2.419 ***
##                                                           (0.333)   
## as.factor(id)10:year_month_id                              4.554 ***
##                                                           (0.439)   
## as.factor(id)11:year_month_id                              1.382 ***
##                                                           (0.342)   
## as.factor(id)12:year_month_id                              0.953 *  
##                                                           (0.413)   
## as.factor(id)13:year_month_id                              1.132 ** 
##                                                           (0.344)   
## as.factor(id)14:year_month_id                              1.221 ** 
##                                                           (0.349)   
## as.factor(id)15:year_month_id                              1.194 ** 
##                                                           (0.366)   
## as.factor(id)16:year_month_id                              1.435 *  
##                                                           (0.606)   
## as.factor(id)17:year_month_id                              1.591 ** 
##                                                           (0.558)   
## as.factor(id)18:year_month_id                              0.803    
##                                                           (0.436)   
## as.factor(id)19:year_month_id                              2.080 ***
##                                                           (0.450)   
## as.factor(id)20:year_month_id                              2.588 ***
##                                                           (0.378)   
## as.factor(id)21:year_month_id                              0.457    
##                                                           (0.416)   
## as.factor(id)22:year_month_id                              1.638 ***
##                                                           (0.386)   
## as.factor(id)23:year_month_id                              0.777 *  
##                                                           (0.351)   
## as.factor(id)24:year_month_id                              0.699 *  
##                                                           (0.332)   
## as.factor(id)25:year_month_id                              1.312 ** 
##                                                           (0.460)   
## as.factor(id)26:year_month_id                             -0.196    
##                                                           (0.350)   
## as.factor(id)27:year_month_id                              1.399 ** 
##                                                           (0.402)   
## as.factor(id)28:year_month_id                             -0.389    
##                                                           (0.407)   
## as.factor(id)29:year_month_id                              1.639 ***
##                                                           (0.461)   
## as.factor(id)30:year_month_id                              0.833 *  
##                                                           (0.369)   
## as.factor(id)31:year_month_id                                       
##                                                                     
## as.factor(id)32:year_month_id                              2.377 ***
##                                                           (0.521)   
## as.factor(id)33:year_month_id                             -3.094 ***
##                                                           (0.181)   
## as.factor(id)34:year_month_id                             -2.712 ***
##                                                           (0.363)   
## as.factor(id)35:year_month_id                              0.962 *  
##                                                           (0.424)   
## as.factor(id)36:year_month_id                              0.755 ** 
##                                                           (0.238)   
## as.factor(id)37:year_month_id                             -0.155    
##                                                           (0.299)   
## as.factor(id)38:year_month_id                             -1.129 ***
##                                                           (0.187)   
## as.factor(id)39:year_month_id                              0.129    
##                                                           (0.273)   
## as.factor(id)40:year_month_id                              0.521    
##                                                           (0.420)   
## as.factor(id)41:year_month_id                             -0.417    
##                                                           (0.268)   
## as.factor(id)42:year_month_id                              2.464 ***
##                                                           (0.311)   
## as.factor(id)43:year_month_id                              5.094 ***
##                                                           (0.182)   
## as.factor(id)44:year_month_id                              1.823 ***
##                                                           (0.248)   
## as.factor(id)45:year_month_id                              1.713 ***
##                                                           (0.123)   
## as.factor(id)46:year_month_id                              0.772 ***
##                                                           (0.115)   
## as.factor(id)47:year_month_id                              1.390 *  
##                                                           (0.547)   
## --------------------------------------------------------------------
## R^2                                                        0.901    
## Adj. R^2                                                   0.887    
## Num. obs.                                               1551        
## RMSE                                                     687.739    
## N Clusters                                                47        
## ====================================================================
## *** p < 0.001; ** p < 0.01; * p < 0.05
# DID estimates and 90% CI
df_estimates <- DID_coefficients_main(DID_results = estimation_results, 
                                         treat_var = "unemploy_shock_diff2",
                                 estimation_label = "yoy_total_WLS_trend")

# Event study graph
graph_yoy_total_WLS_trend_covar_onlypost <- event_study_graph(data = df_estimates ,
                                          graph_title = "yoy_total_WLS_trend")

ggplotly(graph_yoy_total_WLS_trend_covar_onlypost)
estimates_yoy_total_WLS_trend_covar_onlypost <- df_estimates #for robustness check

results_yoy_total_WLS_trend_covar_onlypost <- estimation_results # for only-post DID table

10 Y=female unemployment benefit recipients/女性の雇用保険受給者数

11 Y=female unemployment benefit recipients/女性の雇用保険受給者数 with covar

12 Y=female unemployment benefit recipients(YOY)/女性の雇用保険受給者数(前年同月差)

12.5 WLS, with trends, post-covid-month dummies, TableC.3(4)

# DID estimation
estimation_results <- dynamic_onlypost_DID_WLS_trend(dataset = df_analysis, 
                    outcome_var = df_analysis$yoy_unemp_benefit_number_female, 
                    treat_var = df_analysis$unemploy_shock_diff2)

texreg::screenreg(l = estimation_results , include.ci = FALSE, digits=3)
## 1 coefficient  not defined because the design matrix is rank deficient
## 
## ===========================================
##                                Model 1     
## -------------------------------------------
## treat_var:date_2020_02            2.238    
##                                  (4.982)   
## treat_var:date_2020_03            6.006    
##                                  (7.062)   
## treat_var:date_2020_04           11.089    
##                                  (9.090)   
## treat_var:date_2020_05           10.927    
##                                  (9.774)   
## treat_var:date_2020_06           15.928    
##                                 (15.030)   
## treat_var:date_2020_07           22.779    
##                                 (15.887)   
## treat_var:date_2020_08           17.205    
##                                 (16.629)   
## treat_var:date_2020_09           23.227    
##                                 (15.261)   
## as.factor(id)1:year_month_id     -0.948    
##                                  (0.587)   
## as.factor(id)2:year_month_id     -0.238    
##                                  (0.345)   
## as.factor(id)3:year_month_id     -0.791 *  
##                                  (0.389)   
## as.factor(id)4:year_month_id      1.754 ***
##                                  (0.458)   
## as.factor(id)5:year_month_id      0.038    
##                                  (0.443)   
## as.factor(id)6:year_month_id      0.161    
##                                  (0.419)   
## as.factor(id)7:year_month_id      1.847 ***
##                                  (0.397)   
## as.factor(id)8:year_month_id      1.278 ***
##                                  (0.245)   
## as.factor(id)9:year_month_id      2.895 ***
##                                  (0.258)   
## as.factor(id)10:year_month_id     4.194 ***
##                                  (0.187)   
## as.factor(id)11:year_month_id     0.723    
##                                  (0.536)   
## as.factor(id)12:year_month_id     0.399    
##                                  (0.514)   
## as.factor(id)13:year_month_id     1.061    
##                                  (0.563)   
## as.factor(id)14:year_month_id     0.184    
##                                  (0.710)   
## as.factor(id)15:year_month_id     0.812 *  
##                                  (0.322)   
## as.factor(id)16:year_month_id     1.229 ** 
##                                  (0.354)   
## as.factor(id)17:year_month_id     0.642 *  
##                                  (0.288)   
## as.factor(id)18:year_month_id    -0.588 ** 
##                                  (0.203)   
## as.factor(id)19:year_month_id     2.127 ***
##                                  (0.309)   
## as.factor(id)20:year_month_id     2.597 ***
##                                  (0.197)   
## as.factor(id)21:year_month_id    -0.001    
##                                  (0.224)   
## as.factor(id)22:year_month_id     1.263 ***
##                                  (0.268)   
## as.factor(id)23:year_month_id     1.088 ***
##                                  (0.301)   
## as.factor(id)24:year_month_id     0.262    
##                                  (0.307)   
## as.factor(id)25:year_month_id     0.749 *  
##                                  (0.282)   
## as.factor(id)26:year_month_id    -0.538    
##                                  (0.474)   
## as.factor(id)27:year_month_id     0.680    
##                                  (0.687)   
## as.factor(id)28:year_month_id    -1.605 ** 
##                                  (0.537)   
## as.factor(id)29:year_month_id    -0.261    
##                                  (0.619)   
## as.factor(id)30:year_month_id    -0.785    
##                                  (0.609)   
## as.factor(id)31:year_month_id    -2.201 ***
##                                  (0.404)   
## as.factor(id)32:year_month_id              
##                                            
## as.factor(id)33:year_month_id    -4.712 ***
##                                  (0.288)   
## as.factor(id)34:year_month_id    -4.221 ***
##                                  (0.311)   
## as.factor(id)35:year_month_id    -0.955 ** 
##                                  (0.346)   
## as.factor(id)36:year_month_id    -0.973 *  
##                                  (0.386)   
## as.factor(id)37:year_month_id    -1.090 ** 
##                                  (0.363)   
## as.factor(id)38:year_month_id    -2.753 ***
##                                  (0.338)   
## as.factor(id)39:year_month_id    -1.175 ***
##                                  (0.282)   
## as.factor(id)40:year_month_id    -0.747    
##                                  (0.400)   
## as.factor(id)41:year_month_id    -2.512 ***
##                                  (0.080)   
## as.factor(id)42:year_month_id    -0.274    
##                                  (0.283)   
## as.factor(id)43:year_month_id     4.355 ***
##                                  (0.285)   
## as.factor(id)44:year_month_id     0.106    
##                                  (0.412)   
## as.factor(id)45:year_month_id    -0.239    
##                                  (0.288)   
## as.factor(id)46:year_month_id    -1.476 ** 
##                                  (0.462)   
## as.factor(id)47:year_month_id     1.077    
##                                  (0.742)   
## -------------------------------------------
## R^2                               0.831    
## Adj. R^2                          0.815    
## Num. obs.                      1551        
## RMSE                            915.855    
## N Clusters                       47        
## ===========================================
## *** p < 0.001; ** p < 0.01; * p < 0.05
# DID estimates and 90% CI
df_estimates <- DID_coefficients_main(DID_results = estimation_results, 
                                         treat_var = "unemploy_shock_diff2",
                                 estimation_label = "yoy_female_WLS_trend")

# Event study graph
graph_yoy_female_WLS_trend_onlypost <- event_study_graph(data = df_estimates ,
                                          graph_title = "yoy_female_WLS_trend")

ggplotly(graph_yoy_female_WLS_trend_onlypost)
estimates_yoy_female_WLS_trend_onlypost <- df_estimates #for robustness check

results_yoy_female_WLS_trend_onlypost <- estimation_results # for only-post DID table

13 Y=female unemployment benefit recipients(YOY)/女性の雇用保険受給者数(前年同月差)with covar

13.5 WLS, with trends, post-covid-month dummies, TableC.4 (4)

# DID estimation
estimation_results <- dynamic_onlypost_DID_WLS_trend_covar8Xcovid_months(dataset = df_analysis, 
                    outcome_var = df_analysis$yoy_unemp_benefit_number_female, 
                    treat_var = df_analysis$unemploy_shock_diff2)

texreg::screenreg(l = estimation_results , include.ci = FALSE, digits=3)
## 1 coefficient  not defined because the design matrix is rank deficient
## 
## ====================================================================
##                                                         Model 1     
## --------------------------------------------------------------------
## treat_var:date_2020_02                                    21.167 *  
##                                                           (9.351)   
## treat_var:date_2020_03                                    30.065 *  
##                                                          (13.953)   
## treat_var:date_2020_04                                    28.117    
##                                                          (16.426)   
## treat_var:date_2020_05                                    42.848 ** 
##                                                          (14.130)   
## treat_var:date_2020_06                                    30.120    
##                                                          (19.695)   
## treat_var:date_2020_07                                    36.830 *  
##                                                          (17.435)   
## treat_var:date_2020_08                                    21.173    
##                                                          (14.845)   
## treat_var:date_2020_09                                    25.451 *  
##                                                          (12.482)   
## date_2020_02:google_mobility_index_2020may                -2.170 *  
##                                                           (1.059)   
## date_2020_03:google_mobility_index_2020may                -2.605    
##                                                           (1.302)   
## date_2020_04:google_mobility_index_2020may                -4.449 *  
##                                                           (2.004)   
## date_2020_05:google_mobility_index_2020may                -5.232 ** 
##                                                           (1.786)   
## date_2020_06:google_mobility_index_2020may                -7.948 ** 
##                                                           (2.443)   
## date_2020_07:google_mobility_index_2020may                -9.369 ***
##                                                           (2.642)   
## date_2020_08:google_mobility_index_2020may                -8.330 ***
##                                                           (1.974)   
## date_2020_09:google_mobility_index_2020may                -5.943 ** 
##                                                           (2.087)   
## date_2020_02:infection_rate_cumulative2020jun              1.608    
##                                                           (0.901)   
## date_2020_03:infection_rate_cumulative2020jun              2.097    
##                                                           (1.280)   
## date_2020_04:infection_rate_cumulative2020jun              0.780    
##                                                           (1.524)   
## date_2020_05:infection_rate_cumulative2020jun             -0.435    
##                                                           (1.407)   
## date_2020_06:infection_rate_cumulative2020jun              1.758    
##                                                           (2.468)   
## date_2020_07:infection_rate_cumulative2020jun              0.903    
##                                                           (2.250)   
## date_2020_08:infection_rate_cumulative2020jun              2.248    
##                                                           (1.982)   
## date_2020_09:infection_rate_cumulative2020jun              2.924    
##                                                           (1.730)   
## date_2020_02:death_rate_cumulative2020jun                -23.043 *  
##                                                          (10.382)   
## date_2020_03:death_rate_cumulative2020jun                -31.447 *  
##                                                          (14.768)   
## date_2020_04:death_rate_cumulative2020jun                -21.700    
##                                                          (17.866)   
## date_2020_05:death_rate_cumulative2020jun                 -6.990    
##                                                          (15.842)   
## date_2020_06:death_rate_cumulative2020jun                -30.647    
##                                                          (31.349)   
## date_2020_07:death_rate_cumulative2020jun                -21.681    
##                                                          (28.052)   
## date_2020_08:death_rate_cumulative2020jun                -28.392    
##                                                          (22.843)   
## date_2020_09:death_rate_cumulative2020jun                -33.808    
##                                                          (17.508)   
## date_2020_02:Population_per_1_km_2_of_inhabitable_area    -0.007 ***
##                                                           (0.002)   
## date_2020_03:Population_per_1_km_2_of_inhabitable_area    -0.009 ** 
##                                                           (0.003)   
## date_2020_04:Population_per_1_km_2_of_inhabitable_area    -0.009 ** 
##                                                           (0.003)   
## date_2020_05:Population_per_1_km_2_of_inhabitable_area    -0.010 ***
##                                                           (0.003)   
## date_2020_06:Population_per_1_km_2_of_inhabitable_area    -0.012 ** 
##                                                           (0.005)   
## date_2020_07:Population_per_1_km_2_of_inhabitable_area    -0.014 ** 
##                                                           (0.004)   
## date_2020_08:Population_per_1_km_2_of_inhabitable_area    -0.014 ***
##                                                           (0.003)   
## date_2020_09:Population_per_1_km_2_of_inhabitable_area    -0.011 ***
##                                                           (0.003)   
## date_2020_02:Secondary_industry_ratio                    191.990    
##                                                         (102.344)   
## date_2020_03:Secondary_industry_ratio                    160.532    
##                                                         (139.847)   
## date_2020_04:Secondary_industry_ratio                    135.806    
##                                                         (194.386)   
## date_2020_05:Secondary_industry_ratio                     52.377    
##                                                         (167.813)   
## date_2020_06:Secondary_industry_ratio                   -100.038    
##                                                         (220.435)   
## date_2020_07:Secondary_industry_ratio                     41.530    
##                                                         (211.928)   
## date_2020_08:Secondary_industry_ratio                    269.282    
##                                                         (194.720)   
## date_2020_09:Secondary_industry_ratio                    426.314 *  
##                                                         (201.716)   
## date_2020_02:Tertiary_industry_ratio                    -111.621    
##                                                         (128.810)   
## date_2020_03:Tertiary_industry_ratio                    -174.428    
##                                                         (201.667)   
## date_2020_04:Tertiary_industry_ratio                    -200.698    
##                                                         (278.853)   
## date_2020_05:Tertiary_industry_ratio                    -505.215 *  
##                                                         (210.430)   
## date_2020_06:Tertiary_industry_ratio                    -646.009    
##                                                         (321.910)   
## date_2020_07:Tertiary_industry_ratio                    -640.142 *  
##                                                         (303.914)   
## date_2020_08:Tertiary_industry_ratio                    -286.009    
##                                                         (228.150)   
## date_2020_09:Tertiary_industry_ratio                     -66.487    
##                                                         (203.477)   
## date_2020_02:Total_population                              0.035 ** 
##                                                           (0.010)   
## date_2020_03:Total_population                              0.035 *  
##                                                           (0.015)   
## date_2020_04:Total_population                              0.050 *  
##                                                           (0.024)   
## date_2020_05:Total_population                              0.054 ** 
##                                                           (0.019)   
## date_2020_06:Total_population                              0.030    
##                                                           (0.033)   
## date_2020_07:Total_population                              0.039    
##                                                           (0.030)   
## date_2020_08:Total_population                              0.023    
##                                                           (0.028)   
## date_2020_09:Total_population                              0.019    
##                                                           (0.028)   
## date_2020_02:Ratio_of_aged_population                      0.786    
##                                                           (0.541)   
## date_2020_03:Ratio_of_aged_population                      0.575    
##                                                           (0.608)   
## date_2020_04:Ratio_of_aged_population                      0.937    
##                                                           (1.034)   
## date_2020_05:Ratio_of_aged_population                      0.942    
##                                                           (0.849)   
## date_2020_06:Ratio_of_aged_population                      0.318    
##                                                           (1.346)   
## date_2020_07:Ratio_of_aged_population                     -0.336    
##                                                           (1.441)   
## date_2020_08:Ratio_of_aged_population                     -1.152    
##                                                           (1.237)   
## date_2020_09:Ratio_of_aged_population                     -1.297    
##                                                           (1.201)   
## as.factor(id)1:year_month_id                              -0.051    
##                                                           (0.541)   
## as.factor(id)2:year_month_id                               2.302 ***
##                                                           (0.210)   
## as.factor(id)3:year_month_id                               1.031 ***
##                                                           (0.186)   
## as.factor(id)4:year_month_id                               2.522 ***
##                                                           (0.377)   
## as.factor(id)5:year_month_id                               2.369 ***
##                                                           (0.371)   
## as.factor(id)6:year_month_id                               0.644    
##                                                           (0.553)   
## as.factor(id)7:year_month_id                               1.859 ***
##                                                           (0.459)   
## as.factor(id)8:year_month_id                               1.220 ***
##                                                           (0.303)   
## as.factor(id)9:year_month_id                               2.432 ***
##                                                           (0.347)   
## as.factor(id)10:year_month_id                              4.614 ***
##                                                           (0.494)   
## as.factor(id)11:year_month_id                              0.694    
##                                                           (0.380)   
## as.factor(id)12:year_month_id                              0.265    
##                                                           (0.480)   
## as.factor(id)13:year_month_id                              0.925 *  
##                                                           (0.420)   
## as.factor(id)14:year_month_id                              0.835 *  
##                                                           (0.349)   
## as.factor(id)15:year_month_id                              1.615 ***
##                                                           (0.379)   
## as.factor(id)16:year_month_id                              1.943 ** 
##                                                           (0.693)   
## as.factor(id)17:year_month_id                              1.381 *  
##                                                           (0.640)   
## as.factor(id)18:year_month_id                              0.716    
##                                                           (0.493)   
## as.factor(id)19:year_month_id                              1.728 ***
##                                                           (0.486)   
## as.factor(id)20:year_month_id                              2.234 ***
##                                                           (0.435)   
## as.factor(id)21:year_month_id                             -0.167    
##                                                           (0.469)   
## as.factor(id)22:year_month_id                              0.798    
##                                                           (0.439)   
## as.factor(id)23:year_month_id                              0.411    
##                                                           (0.359)   
## as.factor(id)24:year_month_id                              0.169    
##                                                           (0.380)   
## as.factor(id)25:year_month_id                              0.279    
##                                                           (0.511)   
## as.factor(id)26:year_month_id                             -0.587    
##                                                           (0.384)   
## as.factor(id)27:year_month_id                              1.245 ** 
##                                                           (0.428)   
## as.factor(id)28:year_month_id                             -1.234 *  
##                                                           (0.466)   
## as.factor(id)29:year_month_id                              1.147 *  
##                                                           (0.515)   
## as.factor(id)30:year_month_id                              0.509    
##                                                           (0.385)   
## as.factor(id)31:year_month_id                                       
##                                                                     
## as.factor(id)32:year_month_id                              2.192 ***
##                                                           (0.501)   
## as.factor(id)33:year_month_id                             -3.884 ***
##                                                           (0.213)   
## as.factor(id)34:year_month_id                             -3.755 ***
##                                                           (0.419)   
## as.factor(id)35:year_month_id                              0.527    
##                                                           (0.450)   
## as.factor(id)36:year_month_id                              0.470    
##                                                           (0.284)   
## as.factor(id)37:year_month_id                             -0.202    
##                                                           (0.345)   
## as.factor(id)38:year_month_id                             -1.356 ***
##                                                           (0.206)   
## as.factor(id)39:year_month_id                              0.834 ** 
##                                                           (0.273)   
## as.factor(id)40:year_month_id                             -0.241    
##                                                           (0.480)   
## as.factor(id)41:year_month_id                             -1.199 ***
##                                                           (0.277)   
## as.factor(id)42:year_month_id                              2.176 ***
##                                                           (0.300)   
## as.factor(id)43:year_month_id                              6.143 ***
##                                                           (0.183)   
## as.factor(id)44:year_month_id                              1.574 ***
##                                                           (0.259)   
## as.factor(id)45:year_month_id                              1.935 ***
##                                                           (0.115)   
## as.factor(id)46:year_month_id                              0.659 ***
##                                                           (0.131)   
## as.factor(id)47:year_month_id                              1.147 *  
##                                                           (0.427)   
## --------------------------------------------------------------------
## R^2                                                        0.870    
## Adj. R^2                                                   0.851    
## Num. obs.                                               1551        
## RMSE                                                     822.383    
## N Clusters                                                47        
## ====================================================================
## *** p < 0.001; ** p < 0.01; * p < 0.05
# DID estimates and 90% CI
df_estimates <- DID_coefficients_main(DID_results = estimation_results, 
                                         treat_var = "unemploy_shock_diff2",
                                 estimation_label = "yoy_female_WLS_trend")

# Event study graph
graph_yoy_female_WLS_trend_covar_onlypost <- event_study_graph(data = df_estimates ,
                                          graph_title = "yoy_female_WLS_trend")

ggplotly(graph_yoy_female_WLS_trend_covar_onlypost)
estimates_yoy_female_WLS_trend_covar_onlypost <- df_estimates #for robustness check

results_yoy_female_WLS_trend_covar_onlypost <- estimation_results # for only-post DID table

14 Y=male unemployment benefit recipients/男性の雇用保険受給者数

15 Y=male unemployment benefit recipients/男性の雇用保険受給者数 with covar

16 Y=male unemployment benefit recipients(YOY)/男性の雇用保険受給者数(前年同月差)

16.5 WLS, with trends, post-covid-month dummies, tableC.3 (6)

# DID estimation
estimation_results <- dynamic_onlypost_DID_WLS_trend(dataset = df_analysis, 
                    outcome_var = df_analysis$yoy_unemp_benefit_number_male, 
                    treat_var = df_analysis$unemploy_shock_diff2)

texreg::screenreg(l = estimation_results , include.ci = FALSE, digits=3,)
## 1 coefficient  not defined because the design matrix is rank deficient
## 
## ===========================================
##                                Model 1     
## -------------------------------------------
## treat_var:date_2020_02            0.747    
##                                  (5.837)   
## treat_var:date_2020_03            5.209    
##                                  (7.947)   
## treat_var:date_2020_04            8.632    
##                                  (9.132)   
## treat_var:date_2020_05            3.691    
##                                 (12.740)   
## treat_var:date_2020_06           12.442    
##                                 (16.067)   
## treat_var:date_2020_07           10.940    
##                                 (14.659)   
## treat_var:date_2020_08            5.405    
##                                 (16.937)   
## treat_var:date_2020_09            7.764    
##                                 (17.096)   
## as.factor(id)1:year_month_id     -0.505    
##                                  (0.654)   
## as.factor(id)2:year_month_id      0.480    
##                                  (0.384)   
## as.factor(id)3:year_month_id     -0.241    
##                                  (0.433)   
## as.factor(id)4:year_month_id      1.389 ** 
##                                  (0.510)   
## as.factor(id)5:year_month_id      0.421    
##                                  (0.492)   
## as.factor(id)6:year_month_id      1.038 *  
##                                  (0.467)   
## as.factor(id)7:year_month_id      2.766 ***
##                                  (0.442)   
## as.factor(id)8:year_month_id      1.624 ***
##                                  (0.273)   
## as.factor(id)9:year_month_id      2.052 ***
##                                  (0.287)   
## as.factor(id)10:year_month_id     3.450 ***
##                                  (0.208)   
## as.factor(id)11:year_month_id     1.463 *  
##                                  (0.597)   
## as.factor(id)12:year_month_id     0.615    
##                                  (0.573)   
## as.factor(id)13:year_month_id     0.784    
##                                  (0.628)   
## as.factor(id)14:year_month_id    -0.012    
##                                  (0.791)   
## as.factor(id)15:year_month_id    -0.445    
##                                  (0.358)   
## as.factor(id)16:year_month_id     0.322    
##                                  (0.394)   
## as.factor(id)17:year_month_id     1.128 ***
##                                  (0.320)   
## as.factor(id)18:year_month_id    -0.151    
##                                  (0.226)   
## as.factor(id)19:year_month_id     1.878 ***
##                                  (0.344)   
## as.factor(id)20:year_month_id     2.242 ***
##                                  (0.219)   
## as.factor(id)21:year_month_id     0.307    
##                                  (0.250)   
## as.factor(id)22:year_month_id     1.657 ***
##                                  (0.299)   
## as.factor(id)23:year_month_id     0.745 *  
##                                  (0.336)   
## as.factor(id)24:year_month_id     0.324    
##                                  (0.342)   
## as.factor(id)25:year_month_id     2.080 ***
##                                  (0.315)   
## as.factor(id)26:year_month_id    -0.643    
##                                  (0.528)   
## as.factor(id)27:year_month_id     0.506    
##                                  (0.766)   
## as.factor(id)28:year_month_id    -0.581    
##                                  (0.599)   
## as.factor(id)29:year_month_id     0.281    
##                                  (0.689)   
## as.factor(id)30:year_month_id     0.098    
##                                  (0.678)   
## as.factor(id)31:year_month_id    -1.753 ***
##                                  (0.450)   
## as.factor(id)32:year_month_id              
##                                            
## as.factor(id)33:year_month_id    -3.635 ***
##                                  (0.321)   
## as.factor(id)34:year_month_id    -3.125 ***
##                                  (0.347)   
## as.factor(id)35:year_month_id    -0.685    
##                                  (0.385)   
## as.factor(id)36:year_month_id    -0.663    
##                                  (0.430)   
## as.factor(id)37:year_month_id    -1.783 ***
##                                  (0.405)   
## as.factor(id)38:year_month_id    -2.207 ***
##                                  (0.376)   
## as.factor(id)39:year_month_id    -2.551 ***
##                                  (0.313)   
## as.factor(id)40:year_month_id     0.057    
##                                  (0.446)   
## as.factor(id)41:year_month_id    -1.072 ***
##                                  (0.089)   
## as.factor(id)42:year_month_id     0.294    
##                                  (0.315)   
## as.factor(id)43:year_month_id     2.119 ***
##                                  (0.317)   
## as.factor(id)44:year_month_id     0.692    
##                                  (0.459)   
## as.factor(id)45:year_month_id    -0.401    
##                                  (0.321)   
## as.factor(id)46:year_month_id    -1.102 *  
##                                  (0.514)   
## as.factor(id)47:year_month_id     0.839    
##                                  (0.827)   
## -------------------------------------------
## R^2                               0.890    
## Adj. R^2                          0.880    
## Num. obs.                      1551        
## RMSE                            707.368    
## N Clusters                       47        
## ===========================================
## *** p < 0.001; ** p < 0.01; * p < 0.05
# DID estimates and 90% CI
df_estimates <- DID_coefficients_main(DID_results = estimation_results, 
                                         treat_var = "unemploy_shock_diff2",
                                 estimation_label = "yoy_male_WLS_trend")

# Event study graph
graph_yoy_male_WLS_trend_onlypost <- event_study_graph(data = df_estimates ,
                                          graph_title = "yoy_male_WLS_trend")

ggplotly(graph_yoy_male_WLS_trend_onlypost)
estimates_yoy_male_WLS_trend_onlypost <- df_estimates #for robustness check

results_yot_male_WLS_trend_onlypost <- estimation_results # for only-post DID table

17 Y=male unemployment benefit recipients(YOY)/男性の雇用保険受給者数(前年同月差)with covar

17.5 WLS, with trends, post-covid-month dummies, TableC.4 (6)

# DID estimation
estimation_results <- dynamic_onlypost_DID_WLS_trend_covar8Xcovid_months(dataset = df_analysis, 
                    outcome_var = df_analysis$yoy_unemp_benefit_number_male, 
                    treat_var = df_analysis$unemploy_shock_diff2)

texreg::screenreg(l = estimation_results , include.ci = FALSE, digits=3,)
## 1 coefficient  not defined because the design matrix is rank deficient
## 
## ====================================================================
##                                                         Model 1     
## --------------------------------------------------------------------
## treat_var:date_2020_02                                    14.955    
##                                                          (11.778)   
## treat_var:date_2020_03                                    23.933    
##                                                          (14.809)   
## treat_var:date_2020_04                                    23.660    
##                                                          (16.460)   
## treat_var:date_2020_05                                    34.396 *  
##                                                          (16.545)   
## treat_var:date_2020_06                                    29.930    
##                                                          (18.416)   
## treat_var:date_2020_07                                    30.419    
##                                                          (19.214)   
## treat_var:date_2020_08                                    29.672    
##                                                          (21.206)   
## treat_var:date_2020_09                                    30.706    
##                                                          (20.526)   
## date_2020_02:google_mobility_index_2020may                 1.122    
##                                                           (1.228)   
## date_2020_03:google_mobility_index_2020may                 2.197    
##                                                           (1.429)   
## date_2020_04:google_mobility_index_2020may                 0.945    
##                                                           (1.575)   
## date_2020_05:google_mobility_index_2020may                 0.988    
##                                                           (1.414)   
## date_2020_06:google_mobility_index_2020may                -0.779    
##                                                           (1.737)   
## date_2020_07:google_mobility_index_2020may                -3.161    
##                                                           (2.281)   
## date_2020_08:google_mobility_index_2020may                -2.221    
##                                                           (2.490)   
## date_2020_09:google_mobility_index_2020may                -0.703    
##                                                           (2.366)   
## date_2020_02:infection_rate_cumulative2020jun              1.132    
##                                                           (1.243)   
## date_2020_03:infection_rate_cumulative2020jun              2.081    
##                                                           (1.552)   
## date_2020_04:infection_rate_cumulative2020jun              1.456    
##                                                           (1.589)   
## date_2020_05:infection_rate_cumulative2020jun              2.014    
##                                                           (1.706)   
## date_2020_06:infection_rate_cumulative2020jun              3.714    
##                                                           (2.125)   
## date_2020_07:infection_rate_cumulative2020jun              1.646    
##                                                           (2.135)   
## date_2020_08:infection_rate_cumulative2020jun              2.716    
##                                                           (2.344)   
## date_2020_09:infection_rate_cumulative2020jun              3.124    
##                                                           (2.176)   
## date_2020_02:death_rate_cumulative2020jun                 -1.418    
##                                                          (15.680)   
## date_2020_03:death_rate_cumulative2020jun                -12.393    
##                                                          (19.465)   
## date_2020_04:death_rate_cumulative2020jun                 -4.211    
##                                                          (19.146)   
## date_2020_05:death_rate_cumulative2020jun                 -6.402    
##                                                          (19.006)   
## date_2020_06:death_rate_cumulative2020jun                -26.609    
##                                                          (25.145)   
## date_2020_07:death_rate_cumulative2020jun                 -6.337    
##                                                          (23.379)   
## date_2020_08:death_rate_cumulative2020jun                -19.112    
##                                                          (24.107)   
## date_2020_09:death_rate_cumulative2020jun                -24.425    
##                                                          (22.380)   
## date_2020_02:Population_per_1_km_2_of_inhabitable_area    -0.003    
##                                                           (0.002)   
## date_2020_03:Population_per_1_km_2_of_inhabitable_area    -0.005    
##                                                           (0.003)   
## date_2020_04:Population_per_1_km_2_of_inhabitable_area    -0.006 *  
##                                                           (0.003)   
## date_2020_05:Population_per_1_km_2_of_inhabitable_area    -0.010 ** 
##                                                           (0.003)   
## date_2020_06:Population_per_1_km_2_of_inhabitable_area    -0.011 ** 
##                                                           (0.003)   
## date_2020_07:Population_per_1_km_2_of_inhabitable_area    -0.010 ** 
##                                                           (0.004)   
## date_2020_08:Population_per_1_km_2_of_inhabitable_area    -0.010 *  
##                                                           (0.005)   
## date_2020_09:Population_per_1_km_2_of_inhabitable_area    -0.008    
##                                                           (0.005)   
## date_2020_02:Secondary_industry_ratio                     14.591    
##                                                         (118.178)   
## date_2020_03:Secondary_industry_ratio                    -64.400    
##                                                         (138.913)   
## date_2020_04:Secondary_industry_ratio                    -80.410    
##                                                         (157.845)   
## date_2020_05:Secondary_industry_ratio                    -90.046    
##                                                         (158.977)   
## date_2020_06:Secondary_industry_ratio                   -220.885    
##                                                         (159.612)   
## date_2020_07:Secondary_industry_ratio                    -66.354    
##                                                         (186.975)   
## date_2020_08:Secondary_industry_ratio                    -39.009    
##                                                         (205.097)   
## date_2020_09:Secondary_industry_ratio                    -59.411    
##                                                         (217.230)   
## date_2020_02:Tertiary_industry_ratio                    -219.215    
##                                                         (153.945)   
## date_2020_03:Tertiary_industry_ratio                    -323.477    
##                                                         (190.600)   
## date_2020_04:Tertiary_industry_ratio                    -347.244    
##                                                         (225.686)   
## date_2020_05:Tertiary_industry_ratio                    -533.993 ** 
##                                                         (187.827)   
## date_2020_06:Tertiary_industry_ratio                    -673.211 ** 
##                                                         (234.858)   
## date_2020_07:Tertiary_industry_ratio                    -656.614 *  
##                                                         (245.563)   
## date_2020_08:Tertiary_industry_ratio                    -610.271 *  
##                                                         (270.433)   
## date_2020_09:Tertiary_industry_ratio                    -580.142 *  
##                                                         (255.756)   
## date_2020_02:Total_population                              0.002    
##                                                           (0.014)   
## date_2020_03:Total_population                              0.017    
##                                                           (0.016)   
## date_2020_04:Total_population                              0.024    
##                                                           (0.019)   
## date_2020_05:Total_population                              0.039    
##                                                           (0.020)   
## date_2020_06:Total_population                              0.029    
##                                                           (0.022)   
## date_2020_07:Total_population                              0.025    
##                                                           (0.027)   
## date_2020_08:Total_population                              0.010    
##                                                           (0.034)   
## date_2020_09:Total_population                             -0.004    
##                                                           (0.039)   
## date_2020_02:Ratio_of_aged_population                     -0.580    
##                                                           (0.577)   
## date_2020_03:Ratio_of_aged_population                     -0.970    
##                                                           (0.687)   
## date_2020_04:Ratio_of_aged_population                     -0.645    
##                                                           (0.889)   
## date_2020_05:Ratio_of_aged_population                     -0.267    
##                                                           (0.892)   
## date_2020_06:Ratio_of_aged_population                     -0.727    
##                                                           (0.958)   
## date_2020_07:Ratio_of_aged_population                     -0.899    
##                                                           (1.271)   
## date_2020_08:Ratio_of_aged_population                     -1.438    
##                                                           (1.570)   
## date_2020_09:Ratio_of_aged_population                     -2.010    
##                                                           (1.590)   
## as.factor(id)1:year_month_id                              -0.070    
##                                                           (0.426)   
## as.factor(id)2:year_month_id                               1.904 ***
##                                                           (0.220)   
## as.factor(id)3:year_month_id                               0.963 ***
##                                                           (0.228)   
## as.factor(id)4:year_month_id                               2.934 ***
##                                                           (0.322)   
## as.factor(id)5:year_month_id                               2.078 ***
##                                                           (0.459)   
## as.factor(id)6:year_month_id                               1.330    
##                                                           (0.674)   
## as.factor(id)7:year_month_id                               3.041 ***
##                                                           (0.542)   
## as.factor(id)8:year_month_id                               2.256 ***
##                                                           (0.314)   
## as.factor(id)9:year_month_id                               2.402 ***
##                                                           (0.394)   
## as.factor(id)10:year_month_id                              4.437 ***
##                                                           (0.454)   
## as.factor(id)11:year_month_id                              2.050 ***
##                                                           (0.371)   
## as.factor(id)12:year_month_id                              1.652 ***
##                                                           (0.425)   
## as.factor(id)13:year_month_id                              1.326 ***
##                                                           (0.340)   
## as.factor(id)14:year_month_id                              1.601 ***
##                                                           (0.422)   
## as.factor(id)15:year_month_id                              0.714    
##                                                           (0.408)   
## as.factor(id)16:year_month_id                              0.840    
##                                                           (0.612)   
## as.factor(id)17:year_month_id                              1.763 ** 
##                                                           (0.566)   
## as.factor(id)18:year_month_id                              0.832    
##                                                           (0.467)   
## as.factor(id)19:year_month_id                              2.478 ***
##                                                           (0.508)   
## as.factor(id)20:year_month_id                              2.947 ***
##                                                           (0.427)   
## as.factor(id)21:year_month_id                              1.116 *  
##                                                           (0.448)   
## as.factor(id)22:year_month_id                              2.518 ***
##                                                           (0.424)   
## as.factor(id)23:year_month_id                              1.139 *  
##                                                           (0.429)   
## as.factor(id)24:year_month_id                              1.242 ** 
##                                                           (0.360)   
## as.factor(id)25:year_month_id                              2.372 ***
##                                                           (0.515)   
## as.factor(id)26:year_month_id                              0.206    
##                                                           (0.402)   
## as.factor(id)27:year_month_id                              1.543 ** 
##                                                           (0.460)   
## as.factor(id)28:year_month_id                              0.500    
##                                                           (0.420)   
## as.factor(id)29:year_month_id                              2.115 ***
##                                                           (0.468)   
## as.factor(id)30:year_month_id                              1.176 ** 
##                                                           (0.423)   
## as.factor(id)31:year_month_id                                       
##                                                                     
## as.factor(id)32:year_month_id                              2.532 ***
##                                                           (0.628)   
## as.factor(id)33:year_month_id                             -2.257 ***
##                                                           (0.204)   
## as.factor(id)34:year_month_id                             -1.622 ***
##                                                           (0.368)   
## as.factor(id)35:year_month_id                              1.389 ** 
##                                                           (0.465)   
## as.factor(id)36:year_month_id                              1.026 ***
##                                                           (0.253)   
## as.factor(id)37:year_month_id                             -0.122    
##                                                           (0.316)   
## as.factor(id)38:year_month_id                             -0.900 ***
##                                                           (0.211)   
## as.factor(id)39:year_month_id                             -0.761 *  
##                                                           (0.343)   
## as.factor(id)40:year_month_id                              1.330 ** 
##                                                           (0.418)   
## as.factor(id)41:year_month_id                              0.416    
##                                                           (0.336)   
## as.factor(id)42:year_month_id                              2.776 ***
##                                                           (0.373)   
## as.factor(id)43:year_month_id                              3.920 ***
##                                                           (0.233)   
## as.factor(id)44:year_month_id                              2.083 ***
##                                                           (0.275)   
## as.factor(id)45:year_month_id                              1.408 ***
##                                                           (0.158)   
## as.factor(id)46:year_month_id                              0.870 ***
##                                                           (0.123)   
## as.factor(id)47:year_month_id                              1.610 *  
##                                                           (0.730)   
## --------------------------------------------------------------------
## R^2                                                        0.909    
## Adj. R^2                                                   0.896    
## Num. obs.                                               1551        
## RMSE                                                     658.781    
## N Clusters                                                47        
## ====================================================================
## *** p < 0.001; ** p < 0.01; * p < 0.05
# DID estimates and 90% CI
df_estimates <- DID_coefficients_main(DID_results = estimation_results, 
                                         treat_var = "unemploy_shock_diff2",
                                 estimation_label = "yoy_male_WLS_trend")

# Event study graph
graph_yoy_male_WLS_trend_covar_onlypost <- event_study_graph(data = df_estimates ,
                                          graph_title = "yoy_male_WLS_trend")

ggplotly(graph_yoy_male_WLS_trend_covar_onlypost)
estimates_yoy_male_WLS_trend_covar_onlypost <- df_estimates #for robustness check

results_yoy_male_WLS_trend_covar_onlypost <- estimation_results # for only-post DID table

18 Merge outcome results/アウトカム結果の結合

18.1 Y=total unemployment benefit recipients/男女合計の雇用保険受給者数

#merge and label estimates data
estimates_total_bind <- dplyr::bind_rows(estimates_total_OLS_notrend, 
                                         estimates_total_WLS_notrend, 
                                         estimates_total_OLS_trend,
                                         estimates_total_WLS_trend)

#change labels and reorder labels
estimates_total_bind <- estimates_labeling_main(estimates_total_bind)

# Display results
DT::datatable(estimates_total_bind) %>%
   DT::formatRound(columns = c("estimate", "ci_lower", "ci_upper"), digits=3)
#graph
graph_total_bind <- event_study_graph_bind_main(data = estimates_total_bind, 
                                             graph_title = "Total")

ggplotly(graph_total_bind)

18.2 Y=total unemployment benefit recipients/男女合計の雇用保険受給者数 with covar

#merge and label estimates data
estimates_total_bind <- dplyr::bind_rows(estimates_total_OLS_notrend_covar, 
                                         estimates_total_WLS_notrend_covar, 
                                         estimates_total_OLS_trend_covar,
                                         estimates_total_WLS_trend_covar)

#change labels and reorder labels
estimates_total_bind <- estimates_labeling_main(estimates_total_bind)

# Display results
DT::datatable(estimates_total_bind) %>%
   DT::formatRound(columns = c("estimate", "ci_lower", "ci_upper"), digits=3)
#graph
graph_total_bind_covar <- event_study_graph_bind_main(data = estimates_total_bind, 
                                             graph_title = "Total, with covar")

ggplotly(graph_total_bind_covar)

18.3 Y=total unemployment benefit(YOY) recipients/男女合計の雇用保険受給者数(対前年同期差)

#merge and label estimates data
estimates_yoy_total_bind <- dplyr::bind_rows(estimates_yoy_total_OLS_notrend, 
                                             estimates_yoy_total_WLS_notrend, 
                                             estimates_yoy_total_OLS_trend,
                                             estimates_yoy_total_WLS_trend)

#change labels and reorder labels
estimates_yoy_total_bind <- estimates_labeling_main(estimates_yoy_total_bind)

# display results
DT::datatable(estimates_yoy_total_bind) %>%
   DT::formatRound(columns = c("estimate", "ci_lower", "ci_upper"), digits=3)
#graph
graph_yoy_total_bind <- event_study_graph_bind_main(data = estimates_yoy_total_bind, 
                                             graph_title = "Total, YOY")

ggplotly(graph_yoy_total_bind)

18.4 Y=total unemployment benefit recipients(YOY)/男女合計の雇用保険受給者数(対前年同期差) with covar

#merge and label estimates data
estimates_yoy_total_bind <- dplyr::bind_rows(estimates_yoy_total_OLS_notrend_covar, 
                                             estimates_yoy_total_WLS_notrend_covar, 
                                             estimates_yoy_total_OLS_trend_covar,
                                             estimates_yoy_total_WLS_trend_covar)

#change labels and reorder labels
estimates_yoy_total_bind <- estimates_labeling_main(estimates_yoy_total_bind)

# display results
DT::datatable(estimates_yoy_total_bind) %>%
   DT::formatRound(columns = c("estimate", "ci_lower", "ci_upper"), digits=3)
#graph
graph_yoy_total_bind_covar <- event_study_graph_bind_main(data = estimates_yoy_total_bind, 
                                             graph_title = "Total, YOY, with covar")

ggplotly(graph_yoy_total_bind_covar)

18.5 Y=female unemployment benefit recipients/女性の雇用保険受給者数

#merge and label estimates data
estimates_female_bind <- dplyr::bind_rows(estimates_female_OLS_notrend, 
                                          estimates_female_WLS_notrend, 
                                          estimates_female_OLS_trend,
                                          estimates_female_WLS_trend)

#change labels and reorder labels
estimates_female_bind <- estimates_labeling_main(estimates_female_bind)

# display results
DT::datatable(estimates_female_bind) %>%
   DT::formatRound(columns = c("estimate", "ci_lower", "ci_upper"), digits=3)
#graph
graph_female_bind <- event_study_graph_bind_main(data = estimates_female_bind, 
                                             graph_title = "Female")

ggplotly(graph_female_bind)

18.6 Y=female unemployment benefit recipients/女性の雇用保険受給者数 with covar

#merge and label estimates data
estimates_female_bind <- dplyr::bind_rows(estimates_female_OLS_notrend_covar, 
                                          estimates_female_WLS_notrend_covar, 
                                          estimates_female_OLS_trend_covar,
                                          estimates_female_WLS_trend_covar)

#change labels and reorder labels
estimates_female_bind <- estimates_labeling_main(estimates_female_bind)

# display results
DT::datatable(estimates_female_bind) %>%
   DT::formatRound(columns = c("estimate", "ci_lower", "ci_upper"), digits=3)
#graph
graph_female_bind_covar <- event_study_graph_bind_main(data = estimates_female_bind, 
                                             graph_title = "Female, with covar")

ggplotly(graph_female_bind_covar)

18.7 Y=female unemployment benefit recipients(YOY)/女性の雇用保険受給者数(対前年同期差)

#merge and label estimates data
estimates_yoy_female_bind <- dplyr::bind_rows(estimates_yoy_female_OLS_notrend, 
                                              estimates_yoy_female_WLS_notrend, 
                                              estimates_yoy_female_OLS_trend,
                                              estimates_yoy_female_WLS_trend)

#change labels and reorder labels
estimates_yoy_female_bind <- estimates_labeling_main(estimates_yoy_female_bind)


# display results
DT::datatable(estimates_yoy_female_bind) %>%
   DT::formatRound(columns = c("estimate", "ci_lower", "ci_upper"), digits=3)
#graph
graph_yoy_female_bind <- event_study_graph_bind_main(data = estimates_yoy_female_bind, 
                                             graph_title = "Female, YOY")

ggplotly(graph_yoy_female_bind)

18.8 Y=female unemployment benefit recipients(YOY)/女性の雇用保険受給者数(対前年同期差) with covar

#merge and label estimates data
estimates_yoy_female_bind <- dplyr::bind_rows(estimates_yoy_female_OLS_notrend_covar, 
                                              estimates_yoy_female_WLS_notrend_covar, 
                                              estimates_yoy_female_OLS_trend_covar,
                                              estimates_yoy_female_WLS_trend_covar)

#change labels and reorder labels
estimates_yoy_female_bind <- estimates_labeling_main(estimates_yoy_female_bind)


# display results
DT::datatable(estimates_yoy_female_bind) %>%
   DT::formatRound(columns = c("estimate", "ci_lower", "ci_upper"), digits=3)
#graph
graph_yoy_female_bind_covar <- event_study_graph_bind_main(data = estimates_yoy_female_bind, 
                                             graph_title = "Female, YOY, with covar")

ggplotly(graph_yoy_female_bind_covar)

18.9 Y=male unemployment benefit recipients/男性の雇用保険受給者数

#merge and label estimates data
estimates_male_bind <- dplyr::bind_rows(estimates_male_OLS_notrend, 
                                        estimates_male_WLS_notrend, 
                                        estimates_male_OLS_trend,
                                        estimates_male_WLS_trend)

#change labels and reorder labels
estimates_male_bind <- estimates_labeling_main(estimates_male_bind)


# display results
DT::datatable(estimates_male_bind) %>%
   DT::formatRound(columns = c("estimate", "ci_lower", "ci_upper"), digits=3)
#graph
graph_male_bind <- event_study_graph_bind_main(data = estimates_male_bind, 
                                             graph_title = "Male")

ggplotly(graph_male_bind)

18.10 Y=male unemployment benefit recipients/男性の雇用保険受給者数 with covar

#merge and label estimates data
estimates_male_bind <- dplyr::bind_rows(estimates_male_OLS_notrend_covar, 
                                        estimates_male_WLS_notrend_covar, 
                                        estimates_male_OLS_trend_covar,
                                        estimates_male_WLS_trend_covar)

#change labels and reorder labels
estimates_male_bind <- estimates_labeling_main(estimates_male_bind)


# display results
DT::datatable(estimates_male_bind) %>%
   DT::formatRound(columns = c("estimate", "ci_lower", "ci_upper"), digits=3)
#graph
graph_male_bind_covar <- event_study_graph_bind_main(data = estimates_male_bind, 
                                             graph_title = "Male, with covar")

ggplotly(graph_male_bind_covar)

18.11 Y=male unemployment benefit recipients(YOY)/男性の雇用保険受給者数(対前年同期差)

#merge and label estimates data
estimates_yoy_male_bind <- dplyr::bind_rows(estimates_yoy_male_OLS_notrend, 
                                            estimates_yoy_male_WLS_notrend, 
                                            estimates_yoy_male_OLS_trend,
                                            estimates_yoy_male_WLS_trend)

#change labels and reorder labels
estimates_yoy_male_bind <- estimates_labeling_main(estimates_yoy_male_bind)


# display results
DT::datatable(estimates_yoy_male_bind) %>%
   DT::formatRound(columns = c("estimate", "ci_lower", "ci_upper"), digits=3)
#graph
graph_yoy_male_bind <- event_study_graph_bind_main(data = estimates_yoy_male_bind, 
                                             graph_title = "Male, YOY")

ggplotly(graph_yoy_male_bind)

18.12 Y=male unemployment benefit recipients(YOY)/男性の雇用保険受給者数(対前年同期差) with covar

#merge and label estimates data
estimates_yoy_male_bind <- dplyr::bind_rows(estimates_yoy_male_OLS_notrend_covar, 
                                            estimates_yoy_male_WLS_notrend_covar, 
                                            estimates_yoy_male_OLS_trend_covar,
                                            estimates_yoy_male_WLS_trend_covar)

#change labels and reorder labels
estimates_yoy_male_bind <- estimates_labeling_main(estimates_yoy_male_bind)


# display results
DT::datatable(estimates_yoy_male_bind) %>%
   DT::formatRound(columns = c("estimate", "ci_lower", "ci_upper"), digits=3)
#graph
graph_yoy_male_bind_covar <- event_study_graph_bind_main(data = estimates_yoy_male_bind, 
                                             graph_title = "Male, YOY, with covar")

ggplotly(graph_yoy_male_bind_covar)

18.13 GGplotly

#ggplotly
ggplotly(graph_yoy_total_bind)
ggplotly(graph_yoy_total_bind_covar)
ggplotly(graph_yoy_female_bind)
ggplotly(graph_yoy_female_bind_covar)
ggplotly(graph_yoy_male_bind) 
ggplotly(graph_yoy_male_bind_covar)

19 Merge graphs/グラフ統合

19.1 Extract legend/legend取り出し

#Legendの表示
graph_for_legend  <- graph_total_bind +
 theme(legend.position = 'bottom', # Adjust x axis label
       legend.title = element_text(colour = "black", size = 20),
       legend.text = element_text(color = "black", size = 20))
graph_for_legend  

#extract legend
legend_model_types <- ggpubr::get_legend(graph_for_legend)
legend_model_types <- ggpubr::as_ggplot(legend_model_types)
legend_model_types

#2行Legendの表示
graph_for_legend_2row  <- graph_total_bind +
 theme(legend.position = 'bottom', # Adjust x axis label
       legend.title = element_text(colour = "black", size = 20),
       legend.text = element_text(color = "black", size = 20))+
  guides(color = guide_legend(nrow = 2, byrow = TRUE)) #legendを二行に変更 2021Sep7 Waki 
graph_for_legend_2row  

#extract legend
legend_2row_model_types <- ggpubr::get_legend(graph_for_legend_2row)
legend_2row_model_types <- ggpubr::as_ggplot(legend_2row_model_types)
legend_2row_model_types

19.2 Merge/統合

グラフを統合して論文用に保存。

19.2.1 graph size

dpi_num <- 100
width_num <- 15
height_num <- 18

19.2.4 Robustness check

ymin <- - 30
ymax <- 75

ymin_num <- - 25
ymax_num  <- 75
interval <- 25

graph_total_bind <- graph_total_bind + 
  labs(title = "(a) Total unemployment benefit recipients") + 
  scale_y_continuous(limit = c(ymin, ymax), breaks=seq(ymin_num, ymax_num, interval))

graph_total_bind_covar <- graph_total_bind_covar + 
  labs(title = "(b) Total unemployment benefit recipients, with covaraites") + 
  scale_y_continuous(limit = c(ymin, ymax), breaks=seq(ymin_num, ymax_num, interval))


graph_female_bind <- graph_female_bind + 
  labs(title = "(c) Female unemployment benefit recipients")+ 
  scale_y_continuous(limit = c(ymin, ymax), breaks=seq(ymin_num, ymax_num, interval))

graph_female_bind_covar <- graph_female_bind_covar + 
  labs(title = "(d) Female unemployment benefit recipients, with covaraites") + 
  scale_y_continuous(limit = c(ymin, ymax), breaks=seq(ymin_num, ymax_num, interval))

graph_male_bind <- graph_male_bind + 
  labs(title = "(e) Male unemployment benefit recipients")+ 
  scale_y_continuous(limit = c(ymin, ymax), breaks=seq(ymin_num, ymax_num, interval))

graph_male_bind_covar <- graph_male_bind_covar + 
  labs(title = "(f) Male unemployment benefit recipients, with covaraites") + 
  scale_y_continuous(limit = c(ymin, ymax), breaks=seq(ymin_num, ymax_num, interval))

graph <- (graph_total_bind | graph_total_bind_covar) / 
  (graph_female_bind| graph_female_bind_covar) / 
  (graph_male_bind| graph_male_bind_covar)/
  legend_model_types+
  plot_layout(heights = c(2, 2, 2, 0.5))  #0.3から0.5へ変更 2021Sep7 Waki

graph

#保存

ggsave(file = "output/graph_unemploy_diff2_on_UIbenefit_robust.pdf", plot = graph, 
       dpi = dpi_num, width = width_num, height = height_num)     

19.2.5 Robustness check (YOY)

ymin <- - 30
ymax <- 100

ymin_num <- - 25
ymax_num  <- 100
interval <- 25

graph_yoy_total_bind <- graph_yoy_total_bind + 
  labs(title = "(a) Total") + 
  scale_y_continuous(limit = c(ymin, ymax), breaks=seq(ymin_num, ymax_num, interval))

graph_yoy_total_bind_covar <- graph_yoy_total_bind_covar + 
  labs(title = "(b) Total, with covaraites") + 
  scale_y_continuous(limit = c(ymin, ymax), breaks=seq(ymin_num, ymax_num, interval))

graph_yoy_female_bind <- graph_yoy_female_bind + 
  labs(title = "(c) Female") + 
  scale_y_continuous(limit = c(ymin, ymax), breaks=seq(ymin_num, ymax_num, interval))

graph_yoy_female_bind_covar <- graph_yoy_female_bind_covar + 
  labs(title = "(d) Female, with covaraites") + 
  scale_y_continuous(limit = c(ymin, ymax), breaks=seq(ymin_num, ymax_num, interval))

graph_yoy_male_bind <- graph_yoy_male_bind + 
  labs(title = "(e) Male") + 
  scale_y_continuous(limit = c(ymin, ymax), breaks=seq(ymin_num, ymax_num, interval))

graph_yoy_male_bind_covar <- graph_yoy_male_bind_covar + 
  labs(title = "(f) Male, with covaraites") + 
  scale_y_continuous(limit = c(ymin, ymax), breaks=seq(ymin_num, ymax_num, interval))

graph <- (graph_yoy_total_bind | graph_yoy_total_bind_covar) / 
  (graph_yoy_female_bind| graph_yoy_female_bind_covar) / 
  (graph_yoy_male_bind| graph_yoy_male_bind_covar)/
  legend_model_types +
  plot_layout(heights = c(2, 2, 2, 0.5))  #0.3から0.5へ変更 2021Sep7 Waki

graph

#保存

ggsave(file = "output/graph_unemploy_diff2_on_yoy_UIbenefit_robust.pdf", plot = graph, 
       dpi = dpi_num, width = width_num, height = height_num) 

20 Regression table/回帰結果表 without covar

options("modelsummary_format_numeric_latex" = "plain")

# 列の選択 column order

# 男女合計、女性、男性、YOYのみ, monthlyhのみ

rows_MONTH <- tribble(~name, ~"(1)", ~"(2)", ~"(3)", ~"(4)", ~"(5)", ~"(6)", 
"Ref. month", "\\footnotesize{Jan.2020}", "\\footnotesize{$\\leq$Jan.2020}",  "\\footnotesize{Jan.2020}", "\\footnotesize{$\\leq$Jan.2020}","\\footnotesize{Jan.2020}", "\\footnotesize{$\\leq$Jan.2020}")

## results list
table_results_MONTH <- list()
table_results_MONTH[["(1)"]] <- results_yot_total_WLS_trend
table_results_MONTH[["(2)"]] <- results_yot_total_WLS_trend_onlypost
table_results_MONTH[["(3)"]] <- results_yoy_female_WLS_trend
table_results_MONTH[["(4)"]] <- results_yoy_female_WLS_trend_onlypost
table_results_MONTH[["(5)"]] <- results_yot_male_WLS_trend
table_results_MONTH[["(6)"]] <- results_yot_male_WLS_trend_onlypost

## HTML table
estimates_table_MONTH(df = table_results_MONTH,
                      rows = rows_MONTH,
                      title_words = "UIbenefit",
                      gof = gm,
                      output_style = "html") %>%
    kableExtra::add_header_above(c(" " = 1, "Total" = 2, "Female" = 2, "Male" = 2))
## 2 coefficients  not defined because the design matrix is rank deficient
## 1 coefficient  not defined because the design matrix is rank deficient
## 2 coefficients  not defined because the design matrix is rank deficient
## 1 coefficient  not defined because the design matrix is rank deficient
## 2 coefficients  not defined because the design matrix is rank deficient
## 1 coefficient  not defined because the design matrix is rank deficient
UIbenefit
Total
Female
Male
Feb. 2020 −3.719 1.544 −3.191 2.238 −4.260 0.747
(3.847) (4.971) (4.072) (4.982) (3.956) (5.837)
Mar. 2020 0.230 5.630 0.495 6.006 0.005 5.209
(5.526) (6.948) (5.572) (7.062) (6.193) (7.947)
Apr. 2020 4.335 9.873 5.495 11.089 3.232 8.632
(6.428) (8.287) (6.668) (9.090) (7.446) (9.132)
May. 2020 1.688 7.364 5.251 10.927 −1.905 3.691
(8.533) (9.874) (7.316) (9.774) (11.813) (12.740)
Jun. 2020 8.374 14.187 10.170 15.928 6.650 12.442
(12.297) (14.172) (12.491) (15.030) (14.739) (16.067)
Jul. 2020 11.007 16.959 16.939 22.779 4.952 10.940
(11.834) (14.094) (12.911) (15.887) (13.260) (14.659)
Aug. 2020 5.319 11.409 11.282 17.205 −0.780 5.405
(14.496) (15.255) (15.032) (16.629) (16.743) (16.937)
Sep. 2020 9.438 15.665 17.222 23.227 1.384 7.764
(15.094) (14.958) (14.673) (15.261) (17.404) (17.096)
Sample size 1551 1551 1551 1551 1551 1551
R2 Adj. 0.862 0.863 0.815 0.815 0.879 0.880
Ref. month {Jan.2020} {\(\leq\)Jan.2020} {Jan.2020} {\(\leq\)Jan.2020} {Jan.2020} {\(\leq\)Jan.2020}
## Latex table
estimates_table_MONTH(df = table_results_MONTH,
                      rows = rows_MONTH,
                      gof = gm,
                      title_words = "Estimation results for unemployment benefits, without covariates", 
                      output_style = "latex") %>% 
  kableExtra::add_header_above(c(" " = 1, "Total" = 2, "Female" = 2, "Male" = 2)) %>%
  kableExtra::add_footnote(c("Notes: Columns (1), (3), and (5) present baseline WLS estimates shown in  the left-hand side of Figure \\ref{fig:DID_unemploy_on_UIbenefit}. Columns (2), (4), and (6) present WLS estimates based on the model \\eqref{eq:did_model_ver2}, weighted by prefecture population size. The treatment variable is the COVID-19-induced employment shock, which is calculated as equation \\eqref{eq:employment_shock}. Robust standard errors are clustered at the prefecture level."),threeparttable = TRUE, notation = "none",escape = FALSE) %>% 
  kableExtra::column_spec(2:7, width = "1.5cm") %>% 
  kableExtra::save_kable("output/table_unemploy_diff2_on_UIbenefit_robust.tex")
## 2 coefficients  not defined because the design matrix is rank deficient
## 
## 1 coefficient  not defined because the design matrix is rank deficient
## 2 coefficients  not defined because the design matrix is rank deficient
## 1 coefficient  not defined because the design matrix is rank deficient
## 2 coefficients  not defined because the design matrix is rank deficient
## 1 coefficient  not defined because the design matrix is rank deficient

21 Regression table/回帰結果表 with covar

# 列の選択 column order

# 男女合計、女性、男性、YOYのみ, monthlyhのみ

rows_MONTH <- tribble(~name, ~"(1)", ~"(2)", ~"(3)", ~"(4)", ~"(5)", ~"(6)", 
"Ref. month", "\\footnotesize{Jan.2020}", "\\footnotesize{$\\leq$Jan.2020}",  "\\footnotesize{Jan.2020}", "\\footnotesize{$\\leq$Jan.2020}","\\footnotesize{Jan.2020}", "\\footnotesize{$\\leq$Jan.2020}")

## results list
table_results_MONTH <- list()
table_results_MONTH[["(1)"]] <- results_yoy_total_WLS_trend_covar
table_results_MONTH[["(2)"]] <- results_yoy_total_WLS_trend_covar_onlypost
table_results_MONTH[["(3)"]] <- results_yoy_female_WLS_trend_covar
table_results_MONTH[["(4)"]] <- results_yoy_female_WLS_trend_covar_onlypost
table_results_MONTH[["(5)"]] <- results_yoy_male_WLS_trend_covar
table_results_MONTH[["(6)"]] <- results_yoy_male_WLS_trend_covar_onlypost

## HTML table
estimates_table_MONTH(df = table_results_MONTH,
                      rows = rows_MONTH,
                      title_words = "UIbenefit",
                      gof = gm,
                      output_style = "html") %>%
    kableExtra::add_header_above(c(" " = 1, "Total" = 2, "Female" = 2, "Male" = 2))
## 2 coefficients  not defined because the design matrix is rank deficient
## 1 coefficient  not defined because the design matrix is rank deficient
## 2 coefficients  not defined because the design matrix is rank deficient
## 1 coefficient  not defined because the design matrix is rank deficient
## 2 coefficients  not defined because the design matrix is rank deficient
## 1 coefficient  not defined because the design matrix is rank deficient
UIbenefit
Total
Female
Male
Feb. 2020 12.950 18.199 15.750 21.167 9.963 14.955
(8.516) (10.175) (8.298) (9.351) (9.593) (11.778)
Mar. 2020 21.687 27.073 24.565 30.065 18.745 23.933
(12.056) (13.816) (12.653) (13.953) (12.580) (14.809)
Apr. 2020 20.389 25.914 22.536 28.117 18.276 23.660
(14.082) (15.932) (14.864) (16.426) (14.479) (16.460)
May. 2020 33.084 38.746 37.184 42.848 28.816 34.396
(12.900) (14.405) (12.692) (14.130) (15.118) (16.545)
Jun. 2020 24.256 30.055 24.375 30.120 24.155 29.930
(14.906) (17.246) (17.225) (19.695) (16.821) (18.416)
Jul. 2020 27.857 33.794 31.002 36.830 24.448 30.419
(14.525) (16.342) (15.199) (17.435) (18.289) (19.214)
Aug. 2020 19.338 25.412 15.263 21.173 23.505 29.672
(15.631) (15.849) (13.875) (14.845) (21.500) (21.206)
Sep. 2020 21.971 28.183 19.458 25.451 24.343 30.706
(15.685) (14.715) (13.172) (12.482) (21.389) (20.526)
Sample size 1551 1551 1551 1551 1551 1551
R2 Adj. 0.887 0.887 0.851 0.851 0.895 0.896
Ref. month {Jan.2020} {\(\leq\)Jan.2020} {Jan.2020} {\(\leq\)Jan.2020} {Jan.2020} {\(\leq\)Jan.2020}
## Latex table
estimates_table_MONTH(df = table_results_MONTH,
                      rows = rows_MONTH,
                      gof = gm,
                      title_words = "Estimation results for unemployment benefits, with covariates", 
                      output_style = "latex") %>% 
  kableExtra::add_header_above(c(" " = 1, "Total" = 2, "Female" = 2, "Male" = 2)) %>%
  kableExtra::add_footnote(c("Notes:  Columns (1), (3), and (5) present WLS estimates shown in the right-hand side of Figure \\ref{fig:DID_unemploy_on_UIbenefit}. Columns (2), (4), and (6) present WLS estimates based on the model \\eqref{eq:did_model_ver2}, weighted by prefecture population size, and eight covariates are additionally controlled for. The treatment variable is the COVID-19-induced employment shock, which is calculated as equation \\eqref{eq:employment_shock}. Robust standard errors are clustered at the prefecture level."),threeparttable = TRUE, notation = "none",escape = FALSE) %>% 
  kableExtra::column_spec(2:7, width = "1.5cm") %>% 
  kableExtra::save_kable("output/table_unemploy_diff2_on_UIbenefit_robust_covar.tex")
## 2 coefficients  not defined because the design matrix is rank deficient
## 
## 1 coefficient  not defined because the design matrix is rank deficient
## 2 coefficients  not defined because the design matrix is rank deficient
## 1 coefficient  not defined because the design matrix is rank deficient
## 2 coefficients  not defined because the design matrix is rank deficient
## 1 coefficient  not defined because the design matrix is rank deficient